*{
    margin: 0;
    padding: 0;
}
body{
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2f3542;
}
.loader{
    width: 100px;
    position: relative;
}
.loader div{
    width: 30px;
    height: 30px;
    background-color: #0abde3;
    position: absolute;
    /* 通过var函数调用自定义属性--i  并计算出各个div的left值 */
    left: calc(var(--i) * 30px);
    animation: move 2s linear infinite;
    animation-delay: calc(var(--i)*-400ms);
}


@keyframes move{
    0%{
        left: 150px;
        top: 0;
    }
    80%{
        left: 0;
        top: 0;
    }
    85%{
        left: 0;
        top: -30px;
        width: 30px;
        height: 30px;
    }
    88%{
        left: 0;
        top: -30px;
    }
    90%{
        width: 60px;
        height: 25px;
    }
    95%{
        left: 150px;
        top: -30px;
        width: 30px;
        height: 30px;
    }
    98%{
        left: 150px;
        top: -30px;
    }
    100%{
        left: 150px;
        top: 0;
    }
}